package com.carSys.Controller;


import com.carSys.Entity.Assignment;
import com.carSys.Entity.RemindRecord;
import com.carSys.Service.RemindRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/carsys/remindRecord")
public class RemindRecordController {
    @Autowired
    private RemindRecordService remindRecordService;

    @PostMapping("/remind/{assignment_id}")
    public boolean remind(@PathVariable long assignment_id){
        return remindRecordService.remind(assignment_id);
    }

    @PostMapping("/deal/{assignment_id}")
    public boolean deal(@PathVariable long assignment_id){
        return remindRecordService.deal(assignment_id);
    }

    @GetMapping("/getRemindRecord/{assignment_id}")
    public RemindRecord getRemindRecord(@PathVariable long assignment_id){
        return remindRecordService.getRemindRecordByAssignmentId(assignment_id);
    }
}
